package com.laycoding.order.controller;

import com.laycoding.common.util.Result;
import com.laycoding.order.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * created with IntelliJ IDEA.
 *
 * @author: guidada
 * @date: 2021/06/04/10:19
 * @description:
 */
@RestController
@RequestMapping("/order")
public class OrderController {
    @Autowired
    private OrderService orderService;
    @RequestMapping("/get")
    public String getOrder(){
        return "order";
    }
    @RequestMapping("/createOrder")
    public Result createOrder(Integer userId,Integer goodsId){
        orderService.createOrder(userId,goodsId);
        return Result.OK(200,"下单成功",null);
    }

}
